<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="cz.tpj.upl.Temporary"%>
<%@page import="cz.tpj.logic.Navigation"%>
<%@page import="java.io.File"%>
<%@page import="java.text.Annotation"%>
<%@page import="org.apache.commons.fileupload.FileUpload"%>
<%@page import="org.apache.naming.resources.FileDirContext"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Teeest</title>
</head>
<%
final String ACTION = "action";
%>
<body>
	<h1>Zajimavosti</h1>
	<form action="test.jsp" method="POST">
		<input type="checkbox" name="aktivity[]" value="1" />Lyzovanie<br />
		<input type="checkbox" name="aktivity[]" value="2" />Plavanie<br />
		<input type="checkbox" name="aktivity[]" value="3" />Relax<br />
		<input type="submit"   name="<%= ACTION %>" value="posli"/>
	</form>
	<%
	String showIt = request.getParameter(ACTION);
	if(showIt != null){
		String[] act = request.getParameterValues("aktivity[]");
		if(act != null){
			for(int i=0; i<act.length; i++){
				out.println("<p>" + act[i] + "</p>");
			}
		}else{
			out.println("<p>Nemam activity :-(</p>");
		}
	}
	
	/*
	<form action="adresa_kam_smerujes_formular" method="post">
	<input type="checkbox" name="aktivity[]" value="1" />Lyzovanie<br />
	<input type="checkbox" name="aktivity[]" value="2" />Plavanie<br />
	<input type="checkbox" name="aktivity[]" value="3" />Relax<br />
	</form>
	*/
	%>
</body>
</html>